#ifndef __QUEUE_H__
#define __QUEUE_H__ 
class Queue {
    private:
        int size = 6;
        int *data;
        int inserted = 0;
    public:
        Queue(int _size) {
            this->data = new int[_size];
            size = _size;
        }
        ~Queue() {
            delete[] data;
        }
        int getSize() {
            return size;
        }
        void enqueue(int item) {
            if (inserted < size)
            {
                inserted++;
            }
            for (int i = size-1; i > 0; i--)
            {
                this->data[i] = this->data[i-1];
            }
            this->data[0] = item;
        }
        void getData(int *data) {
            for (int i = 0; i < size; i++)
            {
                data[i] = this->data[i];
            }
        }
        bool isReady() {
            return inserted == size;
        }
        int getInserted() {
            return inserted;
        }
        int getMidData() {
            return this->data[size / 2];
        }
        int getTop() {
            return this->data[0];
        }
};
#endif